import { axios } from '@/utils/request'

const api = {
  genTableDict: '/system/tableDict'
}
export function getGenTableDictInfo (id) {
  return axios({
    url: api.genTableDict + '/get/'+id,
    method: 'get'
  })
}
export function getGenTableDictList (parameter) {
console.info("parameter:"+JSON.stringify(parameter))
  return axios({
    url: api.genTableDict + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveGenTableDict (parameter) {
  return axios({
    url: api.genTableDict+(parameter.dictId > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delGenTableDict (parameter) {
  return axios({
    url: api.genTableDict + '/remove',
    method: 'post',
    params: parameter
  })
}

export const genTableDictExport = api.genTableDict + '/export'
